1. Field of the Invention
The present invention relates to an electronic computer system and more specifically to a method and device for control of the electronic computer system which results in efficient prefetching of data.
2. Description of the Related Art
With the advent and proliferation of computer systems having a client-server architecture, the size of electronic computers is being reduced relative to the size of previous-generation, general-purpose computers. In client-server systems, the client computers typically include personal computers (PCs), and the management cost for managing the client-server system must be re-estimated to take into account the cost of managing each personal computer (herein after referred to as PC). To reduce the management cost for PCs, a system is employed in which application software or user data is stored in the server and each PC (in its role as a client) accesses the server to use the application software or data stored therein. The server and the PCs are interconnected by network, and are referred to collectively as a network computing system.
In the network computing system as described above, and in most electronic computer systems built around a server, it appears to each client computer (or PC) that the application software or the user data being accessed is stored in or on the hard disk of the respective PC. Also in the network computing system described herein above, a disk sub-system may be connected to the server and a hard disk device of this sub-system may used as a cache.
The performance of a computer system as a whole largely depends on the access speed to the frequently used application software or user data, and particularly to the input/output (IO) performance of a disk sub-system storing the application software or user data. In this system, data is read from the disk device of the disk sub-system and stored in the cache. However, to speed up processing, if the data is already stored in the cache when the access request for the data is made, the data is read directly from the cache.
The above described method is referred to as prefetch processing. Japanese Patent Laid-Open Publication No. SHO 61-175721 discloses prefetch processing in detail. More particularly, the foregoing publication describes an input/output control device capable of prefetching data to be read out, in which an input/output operation request issued by a central processing unit to the input/output control device is statistically analyzed, data is read from an auxiliary storage device of the central processing unit and stored in a built-in, high speed storing unit of the input/output control device. The reading of the data is performed based on information concerning files stored in an auxiliary storage device determined by the central processing unit and on the result of the already mentioned statistical analysis. By doing this, the required data is kept ready in the high speed storing unit at the point in time when a request for reading the data is issued from the central processing unit to the input/output control device. Accordingly, an input operation can be completed within a shorter period of time because the data does not have to be read from the auxiliary storage device in association with a request for the input operation.
Japanese Patent Laid-Open Publication No. HEI 6-332629 discloses a signal processing unit exclusively for magnetic disks. This unit comprises sections such as an access address detection/determination circuit, a buffer control circuit, and a main control section. The access address detection/determination circuit determines whether access to successive addresses on a magnetic disk is made or not and also counts the addresses. The buffer control circuit reads data stored on the magnetic disk regardless of whether a host command has been issued. The main control section determines whether the read data is to be sent to an upper (such as a host) level device while simultaneously storing the data in a data buffer or the read data is to be sent to an upper level device without storing the data in the data buffer and issuing an instruction according to the determination. The main control section also has an access optimizing control function executing statistical analysis of the selecting operation in each of the other sections in response to an access from an upper device, and selects and adapts an optimal control method for access from an upper device based on a result of the above statistical processing.
Further, Japanese Patent Laid-Open Publication No. HEI 7-104940 discloses a disk device. This device includes a reading unit, a transfer unit, an inferring unit, a prefetching unit, a storing unit, and a control unit. The reading unit reads the data recorded on a disk according to a command received from a host control unit. The transfer unit transfers the read data to the host control unit. The inferring unit infers a read command which the host control unit might issue next. The prefetching unit prefetches the data from the disk based on the output of the inferring unit. The storing unit stores the data read by the prefetching unit and/or the reading unit. The control unit controls the disk device its entirety.
The inferring unit includes a first determining unit that determines whether a command received previously and a currently-received command are read commands, and a second determining unit that determines whether there is continuity between an ending address of the previous read command and a beginning (or header) address of a current read command. The host control unit infers a read command to be transmitted next and a beginning address of the read command according to a result of determination by the first and second determining units.
In association with the recent scale-up of application software, a number of input and output (hereinafter referred to as I/O) requests are simultaneously and concurrently issued from a plurality of clients connected to a server, and an increasingly larger number of I/O requests for execution modules are reported to a disk device residing on the server side of the client-server computer system. Accordingly, a processing algorithm enabling efficient processing in a device which controls the disk device is needed.
A hit ratio of data stored in a cache is dependent whether the data is prefetched regularly or based upon estimates. In the input/output control device disclosed in Japanese Patent Laid-Open Publication No. SHO 61-175721, however, the type of analytical methods used to analyze the I/O operation requests issued from the central processing unit to the I/O control device are unclear, as is whether the data is prefetched regularly or based upon estimates. For this reason, whether a sufficient hit ratio for data stored in the cache can be obtained is ambiguous.
In the signal processing unit disclosed in Japanese Patent Laid-Open Publication No. HEI 6-332629 discussed earlier, as well as in Japanese Patent Laid-Open Publication No. HEI 7-104940, since data at successive addresses is prefetched and stored in the cache, a requested reading of data requiring prefetching data stored at non-successive addresses cannot be executed effectively, and a sufficient hit ratio is not obtained.
Also, in the disk device disclosed in Japanese Patent Laid-Open Publication No. HEI 7-104940, data stored at successive addresses is prefetched and stored in the cache, a requested reading of data issued requiring prefetching data stored at non-successive addresses cannot be executed effectively, and a sufficient hit ratio is not obtained.
Even if data stored at non-successive addresses are prefetched on the basis of some sort of regularities or estimations, time is required for reading ahead to skip to a non-successive address, namely a seek time is generated, so that data cannot efficiently be prefetched, and high speed reading of data by prefetching may not be realized.
The present invention was made in the light of the circumstances as described above.
It is an object of the present invention to provide an input/output control device that prefetches data efficiently regardless of the succession of the addresses.
It is another object of the present invention to provide a method of estimating which addresses are storing data that is to be prefetched when prefetching data is stored at not-successive addresses.
It is still another object of the present invention to provide an input/output control method of prefetching the data at a high speed without generating a seek time when prefetching data stored at non-successive addresses.
To achieve the objects described above, the present invention comprises an input/output control device controlling transactions of data between a mainframe electronic computer with various slave devices and a storage device storing therein data connected thereto. The input/output control device of the present invention comprises a list with data read requests from each slave device recorded therein according to an order of generation of the requests. The input/output control device of the present invention further comprises an access time determining section, a list adding section, a header registering section, a cache memory, and a cache transfer section.
The access time determining section determines when it receives a data read request from a slave device, whether a specified period of time has passed since the generation of a previous data read request from the same slave device. The list adding section adds a data read request generated within a specified period of time after generation of a previous data read request made from the same slave device to the end of the list for the slave device. The header registering section registers at a header of a new list, a data read request generated after a specified period of time has passed from the generation of a previous data read request from the same slave device. The cache memory stores therein data stored in the storage device. The cache transfer section transfers data from the storage device to the cache memory. In addition, the input/output control device of the present invention stores the data in the cache memory by prefetching the data according to the list.
With the above-mentioned input/output control device of the present invention, a list is provided for each slave device recording therein data read requests from respective slave devices according to the order of generation of the requests, and data is prefetched based on this list, so that it is possible to guess the data stored at non-successive addresses as an object for prefetching, and data can be prefetched regardless of the succession of addresses.
In addition, a data read request generated within a prespecified period of time from generation of a previous data read request from the same slave device is added to an end of the list, while a data read request generated after passage of a prespecified period of time is registered at a header of a new list, so that it is possible to prefetch data for an appropriate number of blocks.
The input/output control device of the present invention comprises a common table and a common table preparing section. The common table records the common sections between at least two different lists. The common table preparing section prepares a common list at a specified time interval and inserts into the at least two different lists information referring to the common table in place of the common section in the at least two different lists.
With the above-mentioned input/output control device of the present invention, common sections between the two lists are stored in a common table. Therefore, not only the common sections are listed at places where the common sections are present in each list but also information is inserted referring to the common table, so common sections are not required to be redundantly stored, reducing the capacity required to store data as compared to the original list.
In the input/output control device of the present invention, the lists of the common table are stored in the storage device.
With the above-mentioned input/output control device of the present invention, the lists and the common table are stored in a device permanently storing data, so that data in the lists and common table are maintained even if the power of a mainframe electronic computer is turned off.
The input/output control device of the present invention further comprises an empty area managing section and a continuous data relocating section. The empty area managing section checks for a continuous empty area storage area in the storage device. The continuous data relocating section writes the data stored in the lists relating to the common section in a continuous empty area of the storage device in a continuous state.
With the above-mentioned input/output control device of the present invention, data corresponding to the common sections between lists is continuously relocated into a continuous empty area of a storage device by a relocating process, so that a series of data corresponding to the common sections is read out from the storage device at a higher speed than the series of data would have been read out if the data were not relocated but stored discreetly in a storage area of the storage device.
In another embodiment, the input/output control device of the present invention further comprises a second storage device connected to the mainframe electronic computer, an empty area managing section that checks for a continuous empty storage area in the second storage device, and a continuous data relocating section that writes the data stored in the lists relating to the common section in a continuous empty area of the second storage section in a continuous state.
With the above-mentioned input/out control device of the present invention, data corresponding to the common sections between the two lists are continuously written into a continuous empty area of a different storage device by a relocating process, so that a series of data corresponding to the common sections is read out from the storage device at a higher speed than the series of data would have been read out if the data had not been relocated but had been stored discontinuously in a storage area of the storage device.
The input/output control device of the present invention, therefore, comprises an input/output control device storing a list including data read requests from computers recorded therein according to an order of generation of the requests and determining whether to add a next data read request from one of the computers to the list corresponding to the one of the computers or to begin a new list, based upon whether the next data read request was made before a specified time had passed since the generation of a previous read request from the same computer, the input/output control device prefetching data according to the list.
In an input/output control method of the present invention, a plurality of slave devices and a storage device are connected to a mainframe electronic computer for executing data transactions between the storage device and the mainframe electronic computer. The method of the present invention comprises a step of determining, when a data read request is generated from a slave device, whether a specified period of time has passed since the generation of a previous data read request from the same slave device. The method of the present invention further comprises a step of adding to the end of a list data read requests generated within a specified period of time after generation of a previous data read request from the same slave device, the list including data read requests from the slave device recorded in the order of generation of the data read requests. In addition, the method of the present invention comprises a step of registering in the header of a new list data read requests each generated after passage of a specified period of time since generation of a previous data read request from the same slave device, the new list recording therein data read requests from the same slave device in the order of generation of the data read requests. Further, the method of the present invention comprises a step of transferring data to a cache memory by prefetching the data from the storage device based on the list.
With the above-mentioned method of the present invention, data is prefetched from a list which includes data read requests from each slave device recorded therein, respectively in an order of generation thereof, so that it is possible to guess the data stored at non-successive addresses as an object to be prefetched. Data can, therefore, be prefetched regardless of the succession of addresses.
In addition, a data read request generated within a prespecified period of time after the generation of a previous data request from the same slave device is added to the end of the list, while a data read request generated after the passage of the prespecified period of time is registered in a header of a new list, so that data can be prefetched for an appropriate number of blocks.
The input/output control method according to the present invention further comprises a step of preparing a common table that records the common section between at least two different lists at a specified time interval and inserts into the lists information referring to the common table in place of the common section between the lists.
With the above-mentioned method of the present invention, common sections between the two lists are stored in a common table, and not only the common sections are listed at places in which the common sections were present in the original lists, but also information referring to the common table is inserted, so that the common sections are not redundantly stored. Accordingly, the amount of storage required to store the data is reduced compared to the amount of storage required to store the original list.
The input/output control method of the present invention further comprises a step of checking for a continuous empty storage area in the storage device and continuously writing the data stored in the lists relating to the common section in the continuous empty area of the storage device.
With the method of the present invention, data corresponding to the common sections between the lists is continuously written in a continuous empty area of a storage device by a relocating process, so that a series of data can be read out from the storage device at a higher speed compared to the data corresponding to the common sections stored in a discontinuous state in the storage device.
The method of an input/output control device of the present invention coupled to a computer, therefore, comprises storing a list including data read requests from computers recorded therein according to an order of generation of the requests, determining whether to add a next data read request from one of the computers to the list corresponding to the one of the computers or to begin a new list, based upon whether the next data read request was made before a specified time had passed since the generation of a previous read request from the same computer, and prefetching data according to the list.
These together with other objects and advantages which will be subsequently apparent, reside in the details of construction and operation as more fully hereinafter described and claimed, reference being had to the accompanying drawings forming a part hereof, wherein like numerals refer to like parts throughout.